package week1.day2;

import java.util.Scanner;

import static java.lang.Math.sqrt;

/**
 * @Author fengzihao
 * @Date 2024-04-16 20:05
 */
public class PrimaryNumber {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int i = scanner.nextInt();
        System.out.println(isPrimary(i));
    }

    public static boolean isPrimary(int i) {
        if (i==1)
            return false;
        for (int j = 2; j < sqrt(i); j++) {
            if(i%j==0)
                return false;
        }
        return true;
    }
}
